#!/bin/bash

PIDPATH='/tmp'

cmd='top -H -d1'

for pidfile in $PIDPATH/*.pid
do
	pid=$(cat $pidfile)
	cmd="$cmd -p $pid"
done

$cmd
